package com.scs.application.modules.dept.entity;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.DataEntity;
import com.scs.application.modules.base.dto.ExpandColumnDTO;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 */
@Data
@Accessors(chain = true)
@EntityClassAnnotation(remark = "手术备货申请明细表")
@TableName("dept_oprt_apply_item")
public class OprtApplyItem extends DataEntity {


    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "外键",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String oprtApplyId;

    @EntityFieldAnnotation(
            text = "跟台包ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String packId;

    @EntityFieldAnnotation(
            text = "耗材关联手术申请明细跟台包Id",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String packApplyItemId;

    @EntityFieldAnnotation(
            text = "0：非包装耗材;1:跟台包",
            length = "255",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String matrType;

    @EntityFieldAnnotation(
            text = "耗材ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String matrId;

    @EntityFieldAnnotation(
            text = "品名",
            length = "255",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String matrName;

    @EntityFieldAnnotation(
            text = "品规",
            length = "255",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String matrSpec;

    @EntityFieldAnnotation(
            text = "包装单位",
            length = "255",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String packageUnit;

    @EntityFieldAnnotation(
            text = "包装数量",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double packageQty;

    @EntityFieldAnnotation(
            text = "单品单位",
            length = "10",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String skuUnit;

    @EntityFieldAnnotation(
            text = "单品数量",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double skuQty;

    @EntityFieldAnnotation(
            text = "注册证号",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String certificateNo;

    @EntityFieldAnnotation(
            text = "单品价格",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double skuPrice;

    @EntityFieldAnnotation(
            text = "还货数量（预留字段）",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double qtyReturn;

    @EntityFieldAnnotation(
            text = "供应商ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String supplierId;

    @EntityFieldAnnotation(
            text = "供应商名称",
            length = "100",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String supplierName;

    @EntityFieldAnnotation(
            text = "备货状态，0：未受理；-1：配送完成；1：已备货；2：已打印",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Integer status;

    @EntityFieldAnnotation(
            text = "备注",
            length = "200",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String remark;

    @EntityFieldAnnotation(
            text = "包装比率",
            type = EntityFieldType.DOUBLE,
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double packageRate;

    @EntityFieldAnnotation(
            text = "合计",
            type = EntityFieldType.DOUBLE,
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double amount;


    // creator ,在父类中处理


    // gmt_create ,在父类中处理


    // modifier ,在父类中处理


    // gmt_modified ,在父类中处理

    @EntityFieldAnnotation(
            text = "耗材型号",
            length = "100",
            not_null = false,
            default_value = "",
            comment = "耗材型号"
    )
    private String matrModel;


    // 子数据
    @TableField(exist = false)
    private List<OprtApplyItem> childData;

    // 字段列表
    @TableField(exist = false)
    private List<ExpandColumnDTO> childCols;

    // 是否显示展开行
    @TableField(exist = false)
    private Boolean showExpand;

}
